package v1

import (
	"context"
	"fmt"
	v1 "start/app/user/srv/data/v1"
	"start/app/user/srv/data/v1/mock"
	"start/app/user/srv/data/v1/store"
)

type UserDto struct {
}

type IUser interface {
	List(ctx context.Context, userDto UserDto)
}

type user struct {
	userStore v1.IUser
}

func (s user) List(ctx context.Context, userDto UserDto) {
	userDOList, err := s.userStore.List(ctx)
	if err != nil {
		return
	}
	fmt.Println(userDOList)
	return
}

func NewUserService() IUser {
	return user{
		userStore: store.NewUserStore(),
	}
}

func NewTestUserService() IUser {
	return user{
		userStore: mock.NewUserStore(),
	}
}
